/*
 * @Author: 恒恒 1067531094@qq.com
 * @Date: 2022-10-09 19:06:18
 * @LastEditors: 恒恒 1067531094@qq.com
 * @LastEditTime: 2022-10-09 20:25:00
 * @FilePath: \作业\只读文件.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置     进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
const fs = require('fs')
const path = require('path')
fs.readdir(__dirname, (err, data) => {
    if (err) {
        console.log('读取错误')
    } else {
        for (let i in data) {
            if (path.extname(data[i]) == '.TXT') {
                console.log(data[i])
            }
        }
    }
})
